home *** CD-ROM | disk | FTP | other *** search
/ Student Private Syndrome 3 / Student Private Syndrome 3.iso / private / janken / janken.dxr / 00001.ls next >
Encoding:
Text File  |  1996-06-21  |  1.5 KB  |  63 lines

  1. on startMovie
  2.   global sndname, seclick, sewin, selose, sedraw
  3.   sound stop 1
  4.   cursor(4)
  5.   set sndname to "@::SOUND:S51.AIF"
  6.   set seclick to "SE01"
  7.   set sewin to "SEWIN"
  8.   set selose to "SELOSE"
  9.   set sedraw to "SEDRAW"
  10. end
  11.  
  12. on pushbutton
  13.   set ch to clickOn()
  14.   set cname1 to item 1 of the name of cast the castNum of sprite ch
  15.   set cname2 to item 2 of the name of cast the castNum of sprite ch
  16.   repeat while the stillDown
  17.     if rollOver(ch) then
  18.       set the castNum of sprite ch to the number of cast (cname1 & "," & "ON")
  19.     else
  20.       set the castNum of sprite ch to the number of cast (cname1 & "," & cname2)
  21.     end if
  22.     updateStage()
  23.   end repeat
  24.   if rollOver(ch) then
  25.     set the castNum of sprite ch to the number of cast (cname1 & "," & "ON")
  26.     set ret to 1
  27.   else
  28.     set the castNum of sprite ch to the number of cast (cname1 & "," & cname2)
  29.     set ret to 0
  30.   end if
  31.   updateStage()
  32.   return ret
  33. end
  34.  
  35. on blinkbutton
  36.   global splist
  37.   repeat with i in splist
  38.     if the type of sprite i <> 0 then
  39.       set cname1 to item 1 of the name of cast the castNum of sprite i
  40.       set cname2 to value(item 2 of the name of cast the castNum of sprite i)
  41.       if cname2 = 2 then
  42.         set cname2 to 1
  43.       else
  44.         set cname2 to cname2 + 1
  45.       end if
  46.       set the castNum of sprite i to the number of cast (cname1 & "," & cname2)
  47.     end if
  48.   end repeat
  49. end
  50.  
  51. on exitready
  52.   repeat with i = 7 to 7
  53.     puppetSprite(i, 0)
  54.   end repeat
  55. end
  56.  
  57. on exitpon
  58.   repeat with i = 7 to 11
  59.     puppetSprite(i, 0)
  60.   end repeat
  61.   puppetSprite(21, 0)
  62. end
  63.